home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Examples
/
First Tutorial
/
Fractal Mountains Source
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
1KB
|
68 lines
; FRACTAL MOUNTAINS
(setq overtonal
(activate-tonality
(overtone-series 1 12 1 '(c 2))))
(setq material (vector-round 0 127 (gen-noise-brownian 9 0.4 0.8)))
(setq melody (vector-to-symbol a x material))
(setq rhythm (vector-to-list (vector-round (get-tick '1/16)
(get-tick '1/4)
material)))
(setq dynamics (change-length times 2 rhythm))
(setq zone (make-zone rhythm))
(def-symbol
sound1 melody
sound2 (find-change
(symbol-scale '(a l)
(symbol-inversion 'h melody)))
)
(def-length
default rhythm
)
(def-tonality
default overtonal
)
(def-zone
default zone
)
(def-channel
sound1 1
sound2 2
)
; Use some new-age sounds
(def-program gm-sound-set
sound1 fx-8-scifi
sound2 fx-4-athmosphere
)
; control the reverberation with a sine wave
; add some panning to make it breath
(def-controller gm-controllers
(sound1
expression (list '(127)
(vector-round 32 127 (gen-sin 1 0.3 16))))
(sound2
panning (list '(0 32 64 96 127)
(vector-round 0 127 (gen-sin 1 0.3 32 180))))
)
; compile it to MIDI file
(midiport :printer)
(def-tempo 120)
(compile-instrument-p "ccl;output:" "fractal"
sound1
sound2
)